package router

import (
	"github.com/gin-gonic/gin"
	"yunwei/go_api/application/api"
	"yunwei/go_api/application/utils"
)

func InitTaskRouter(Router *gin.RouterGroup) {
	/**
	主机相关的路由组
	*/
	TasksRouter := Router.Group("tasks")
	{
		utils.Register(TasksRouter, []string{"GET"}, "table", api.GetTaskList)
		utils.Register(TasksRouter, []string{"POST"}, "start", api.Start)
		utils.Register(TasksRouter, []string{"POST"}, "pause", api.Pause)
		utils.Register(TasksRouter, []string{"GET"}, "detail", api.Detail)
		utils.Register(TasksRouter, []string{"GET"}, "test", api.Run)
	}

}
